home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / HYP / C-D / DeveloperStax.cpt / Developer Stack 1.1 / card_11180.txt < prev    next >
Text File  |  1989-02-26  |  2KB  |  101 lines

  1. -- card: 11180 from stack: in.1
  2. -- bmap block id: 0
  3. -- flags: 4000
  4. -- background id: 3837
  5. -- name: FileModDate
  6. ----- HyperTalk script -----
  7. on closecard
  8.   hide message window
  9. end closecard
  10.  
  11.  
  12. -- part 1 (button)
  13. -- low flags: 00
  14. -- high flags: A003
  15. -- rect: left=82 top=302 right=324 bottom=182
  16. -- title width / last selected line: 0
  17. -- icon id / first selected line: 0 / 0
  18. -- text alignment: 1
  19. -- font id: 0
  20. -- text size: 12
  21. -- style flags: 0
  22. -- line height: 16
  23. -- part name: Install
  24. ----- HyperTalk script -----
  25. on mouseUp
  26.   if the optionkey is down then pass mouseup
  27.   put installres(XFCN,FileModDate) into it
  28.   if it is empty then play oops
  29.   else answer it
  30. end mouseUp
  31.  
  32.  
  33.  
  34. -- part 2 (button)
  35. -- low flags: 00
  36. -- high flags: A004
  37. -- rect: left=231 top=244 right=297 bottom=290
  38. -- title width / last selected line: 0
  39. -- icon id / first selected line: 27056 / 27056
  40. -- text alignment: 1
  41. -- font id: 0
  42. -- text size: 12
  43. -- style flags: 0
  44. -- line height: 16
  45. -- part name: Try this
  46. ----- HyperTalk script -----
  47. on mouseUp
  48.   if the optionkey is down then pass mouseup
  49.   put "Select a file..."
  50.   put filename() into thisfile
  51.   put "Created on " into info
  52.   convert fileModDate(thisfile,true) to short date
  53.   put it after info
  54.   put "; Modified on " after info
  55.   convert fileModDate(thisfile,false) to short date
  56.   put it after info
  57.   put info
  58. end mouseUp
  59.  
  60.  
  61.  
  62. -- part contents for background part 5
  63. ----- text -----
  64. FileModDate
  65.  
  66. -- part contents for background part 10
  67. ----- text -----
  68. 6
  69.  
  70. -- part contents for background part 6
  71. ----- text -----
  72.  
  73. This can be used to get the creation or modification date of a file, or as a 'File exists' utility.
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82. Thanks to:
  83. Dewi Williams
  84. 2227 Juniper Court
  85. Boulder CO 80302
  86. (303) 443 9038
  87. Delphi: DEWI
  88.  
  89.  
  90. -- part contents for background part 7
  91. ----- text -----
  92. Syntax:
  93.  
  94. put FileModDate("PathName",
  95. <needCreation>) into thisDate
  96.  
  97. "PathName" is the full pathname to the target.
  98.  
  99. <needCreation> can be true or false.  If it is true, the function will return the creation date, otherwise it will return the modification date.
  100. The date is returned in ticks format.
  101. If there is an error an empty string is returned.